package com.backend.mapper;

import com.backend.entity.entity.Users;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 作者:xuSen
 * 日期2025/7/20 11:04
 */
@Mapper
public interface AuthMapper {
    @Select("select * from users where username = #{username}")
    Users getUsersByUsername(String username);
    @Insert("insert into users(username,password_hash,phone,role)" +
        " values(#{username},#{passwordHash},#{phone},#{role})")
    void registerUser(Users users);
}
